Principal-component analysis (PCA) is a powerful method for quantitative analysis of NMR spectral data sets. It has the advantage of being model-independent, making it well suited for the analysis of spectra with complicated or unknown line shapes. Previous applications of PCA have required that all spectra in a data set be in-phase, or have implemented iterative methods to analyze spectra which are not perfectly phased. However, improper phasing or imperfect convergence of the iterative methods have resulted in systematic errors in the estimation of peak areas with PCA. A modified method of PCA is presented here which utilizes complex singular value decomposition (SVD) to analyze spectral data sets with any amount of variation in spectral phase. The new method is shown to completely insensitive to spectral phase. In the presence of noise, PCA with complex SVD yields a lower variation in the estimation of peak area than conventional PCA by a factor of approximately 2. The performance of the method is demonstrated with simulated data and in-vivo 31P spectra from human skeletal muscle.